import http from "../request.js";
let url = "/admin/nurseCard/";

// 查询已上线的护理卡列表
export function selectOnlineNurseCardList(data) {
	return http.request({
		url: url + "selectOnlineNurseCardList",
		data,
		method: "post",
	});
}

// 查询护理卡审核列表
export function selectNurseCardList(data) {
	return http.request({
		url: url + "selectNurseCardList",
		data,
		method: "post",
	});
}

// 根据id查询已上线护理卡详情
export function selectNurseCardById(data) {
	return http.request({
		url: url + "selectNurseCardById",
		params: data,
	});
}

// 根据id查看护理卡审核详情
export function selectNurseCardTempById(data) {
	return http.request({
		url: url + "selectNurseCardTempById",
		params: data,
	});
}

// 创建护理卡
export function insertNurseCardTemp(data) {
	return http.request({
		url: url + "insertNurseCardTemp",
		data,
		method: "post",
	});
}

// 根据护理卡编号查询护理卡列表
export function selectUserCardByNumber(data) {
	return http.request({
		url: url + "selectUserCardByNumber",
		data,
		method: "post",
	});
}

// 修改已上线护理卡内容
export function updateNurseCard(data) {
	return http.request({
		url: url + "updateNurseCard",
		data,
		method: "post",
	});
}

// 审核护理卡
export function updateNurseCardTempStatus(data) {
	return http.request({
		url: url + "updateNurseCardTempStatus",
		params: data,
	});
}

// 护理卡冻结
export function updateNurseCardStatus(data) {
	return http.request({
		url: url + "updateNurseCardStatus",
		params: data,
	});
}

// 根据一级菜单查询三级服务
export function selectServicesByParentIdAndName(data) {
	return http.request({
		url: url + "selectServicesByParentIdAndName",
		data,
		method: "post",
	});
}

// 导出兑换码数据
export function deriveRedeemCode(data) {
	return http.request({
		url: url + "deriveRedeemCode",
		data,
		method: "post",
	});
}

//护理卡上线
export function updateNurseCardStatusAPI(data) {
	return http.request({
		url: url + "updateNurseCardStatus",
		params:data,
	});
}